A device operating on a low-power protocol, such as a Universal Serial Bus (USB) protocol, is sometimes required to maintain a certain level of functionality while operating at very low power levels. For example, a low power USB device, such as a device normally operating at a current of less than 100 mA, may be required to support a very low power state. In such a very low power state, such as a USB suspend state, the device may be required to consume as little energy as possible while maintaining the ability to resume full functionality in a higher power state. Such a very low power, or suspend, state is commonly referred to as a “sleep” state, and a process of causing the device to resume full functionality is commonly referred to as “waking” the device from sleep. In some protocols, an amount of current the device may consume while in a sleep state may be less than 500 μA averaged over 1 second.
As functionality is added to a sleep state of such a USB device, the amount of current consumed increases because of the increased power needed to provide the functionality. Therefore, if a method of conserving power is not utilized, other features within the device may need to be curtailed to allow the device to remain within the allotted power limitation of the low power state protocol. Also, some components of such a device may not be easily adaptable to reductions in power consumption, so reductions must be made in such processes or devices where power savings may be available.
A feature that may be added to a USB device is the ability to decode a signal from a remote control while the device is in the aforementioned sleep state. For example, a user may operate the remote control to “wake” the device from its low power sleep state. Typically, a code corresponding to a wake command is carried on an IR carrier frequency generated by the remote control, although other frequency ranges may be used. The device may read such an incoming IR signal to determine whether it contains the proper code for waking the device and thereby leaving the sleep state. In this way, the device may distinguish the wake code within the IR signal from other codes for the device, such as when a user pushes a button on the remote control that relates to a different, non-waking command. Also, the device may distinguish the proper code from codes for other devices.
An incoming IR signal typically has segments where each segment either has an IR carrier present, which indicates an “on” segment, or has no IR carrier present, which indicates an “off” segment. Each of the on or off segments may vary in duration in a predetermined manner. Typically, a device that is decoding an incoming IR signal while operating in a sleep state will measure the time duration of on or off segments in the received signal by sampling the input at regular intervals and comparing the input to a software reference signal. Some tolerance may be incorporated to account for remote timing variability and sampling error, and other sources of error.
Decoding circuitry within the device for sensing and decoding the incoming IR signal typically employs a segment matching process that decomposes the problem of identifying a proper IR signal by solving smaller matching problems. For example, the device looks at each on or off segment of the IR signal and determines if the segment is of approximately a correct time duration. If the time duration is correct, the device proceeds to the next segment. If the time duration is incorrect, the match fails and the device restarts the segment matching process from the beginning. Decoding an IR signal by matching on a segment-by-segment basis is less sensitive to systematic timebase variations between the remote control and the device than can be achieved by other methods such as correlating a IR signal against a reference template in a single step.
Conventional methods of decoding an IR signal, however, still consume too much power for many low-power protocols. Such conventional methods typically involve programming loops, data storage and/or numeric comparisons during the decoding process. Any of such methods involve additional processing steps that require increased processor speed to properly decode an IR signal. For example, the additional steps may include: storing state information, performing arithmetic operations and performing comparisons such as checking an IR signal value against a desired value. Such additional steps necessitate increased processor speed because a certain minimum sampling frequency must be maintained to properly decode an incoming signal. Accordingly, adding extra steps to the decoding process necessarily requires a processor to run the steps faster in order to be able to sample the signal at an appropriate rate. As may be appreciated, the power consumed by such a processor is typically directly proportional to the processor frequency, so the additional steps add to the power consumed by the device.
Accordingly, what is needed is a method for monitoring and decoding a signal that consumes as little power as possible. More specifically, what is needed is a method for decoding a signal that requires no loops, data storage or numeric comparisons, and therefore enables a lower processor speed, thereby reducing the power required by components performing the method.